#!/bin/bash
#for armv7
#export PATH=$PATH:/projects/hnd/tools/linux/armv7-firehome-arm-linux-2.6.36-uclibc-4.5.3/bin/
export PATH=$PATH:/projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/
export CROSSCOMPILE="arm-brcm-linux-uclibcgnueabi-"
# export PATH=$PATH:/projects/toolchain-mips_mips32_gcc-4.8-linaro_uClibc-0.9.33.2/bin
# export CROSSCOMPILE=mips-openwrt-linux-
#export ENV_LDFLAGS=/opt/trunk/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libatomic.a
export HOST=armv7
export DEVNAME=hg261gs
export HTTPS_SUPPORT=1
export USE_WOLFSSL=1
export ENV_LDFLAGS=-static

if [ "$1" = "release" ]; then
	make && make release
else
	make && make tar
fi
 
make clean -C test && make -C test
